package cn.micai.util;

import java.util.Comparator;

/**
 * 描述：
 * <p>
 *
 * @author: 赵新国
 * @date: 2018/6/20 17:37
 */
public class PinyinComparator implements Comparator {

    @Override
    public int compare(Object o1, Object o2) {
        String str1 = PingYinUtil.getPingYin((String) o1);
        String str2 = PingYinUtil.getPingYin((String) o2);
        return str1.compareTo(str2);
    }
}
